feat: add ground truth assertion support to Goal Success Rate evaluator#180
Open
ybdarrenwang wants to merge 2 commits intostrands-agents:mainfrom
Open
feat: add ground truth assertion support to Goal Success Rate evaluator#180ybdarrenwang wants to merge 2 commits intostrands-agents:mainfrom
ybdarrenwang wants to merge 2 commits intostrands-agents:mainfrom
Conversation
Co-authored-by: Kang Zhou <kangzhou1991@gmail.com> Co-authored-by: Subramanian Chidambaram <subbu10123@gmail.com>
poshinchen
requested changes
Mar 27, 2026
Contributor
poshinchen
left a comment
There was a problem hiding this comment.
- I would prefer the assertions to be
expected_criteria/expected_goalto align with what other evaluators have, and to avoid confusion between deterministic assertions
1.2. Addexpected_criteria : str | None = Noneto EvaluationData and Case - How useful is the
additional_context? - Can't the prompt be goal_success_rate_v1? what's the major diff?
afarntrog
reviewed
Mar 27, 2026
Collaborator
Author
|
Collaborator
This is for flexibility. Customers may want to include additional context for their specific use cases/domains, to further guide/help the evaluation. However, it can be removed if flexibility is not a high priority here. |
…ntext and unnecessary async func Co-authored-by: Kang Zhou <kangzhou1991@gmail.com> Co-authored-by: Subramanian Chidambaram <subbu10123@gmail.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR enhances the GoalSuccessRateEvaluator to support assertion-based evaluation mode alongside the existing conversation-analysis mode. The evaluator now accepts ground truth assertions via metadata and validates agent behavior against these explicit success criteria.
Related Issues
#95
Documentation PR
Type of Change
New feature
Testing
How have you tested the change? Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli
hatch run prepareChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.